Exercise 4.1 & 5.1

Nora Chirikure, Ziyu Lin, Felix Hüskes, Anton Bogs & Elias Koch

1 Collider Bias (4.1)

Declare a simple design in which

  • X and Y both have a positive effect on (binary) K but X does not cause Y
  • a researcher conditions on K == 1 when estimating the effect of X on Y

Show that this can generate biased results. Can you find situations where the bias can be either positive or negative?

1.1 DAG

1.2 How can the relationship between X and Y be changed?

1.2.1 K = rbinom(N, 1, prob = pnorm(X + Y))

1.2.2 K = rbinom(N, 1, prob = pnorm(X x Y))

1.2.3 K = rbinom(N, 1, prob = pnorm(X / Y))

2 Estimators (5.1)

Block Treat Outcome
1 0 0
1 0 0
1 1 1
2 0 0
2 0 0
2 0 1
2 1 0
2 1 1
2 1 1

2.1 Block-Wise Estimated Effects

2.2 ATE, ATT, ATU, DIM

2.3 Redesinging & Diagnosing the last Design (Code by Macartan)


Research design diagnosis based on 2 simulations. Diagnosis completed in 0 secs. Diagnosand estimates with bootstrapped standard errors in parentheses (100 replicates).

 Design Inquiry Estimator Outcome Term N Sims   Bias SD Estimate Mean Se
 design     ATE        FE       Y    Z      2  -0.02        0.00    0.35
                                              (0.00)      (0.00)  (0.00)
 design     ATE       IPW       Y    Z      2  -0.00        0.00    0.32
                                              (0.00)      (0.00)  (0.00)
 design     ATE       lin       Y    Z      2   0.00        0.00    0.31
                                              (0.00)      (0.00)  (0.00)

2.4 Estimators side-by-side